
<!DOCTYPE html>
<html ng-app="zqapp">
<head>
  <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
  <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
  <title>angular与javascript相互调用</title>
  <script src="angular-1.5.6/angular.js"></script>
</head>
<body>
  <div ng-controller="zqcontroller">
   <br>
   <input type="text" ng-model="text">
   <button ng-click="show()" type="button" name="button">show</button>
   <br>
  </div>
  <script type="text/javascript">
    var myapp = angular.module('zqapp',[]);
    myapp.controller('zqcontroller',function($window,$scope){
      $scope.text = '';
      $scope.show = function(){
      	
        $window.alert("你输入的是"+$scope.text);
      }
    })
  </script>
</body>

</html>
